package com.treasure.mall.biz.service.core.user;

import com.treasure.mall.biz.dto.user.LoginDTO;
import com.treasure.mall.biz.dto.wechat.CreateWxaCodeDTO;
import com.treasure.mall.biz.entity.user.WechatUser;
import me.chanjar.weixin.common.error.WxErrorException;

import java.io.File;

/**
 *
 * +---------------------------------------------------------
 * * @package: com.treasure.mall.biz.service.core.user
 * * @author: guomw (guomwchen@foxmail.com)
 * * @date: 2020/6/11 12:45
 * * @since: V1.0.0
 * +---------------------------------------------------------
 * 注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的
 * Copyright 2019-2022 com.treasure.mall.biz.service.core.user Inc. All rights reserved.
 */
public interface WeChatService {

    WechatUser loginByCode(String code);

    /**
     * 微信小程序登录
     *
     * @param dto
     * @return
     */
    WechatUser login(LoginDTO dto) throws WxErrorException;


    /**
     * 生成二维码
     *
     * @param dto
     * @return
     * @throws WxErrorException
     */
    File createWxaCodeUnlimit(CreateWxaCodeDTO dto);
}
